//
// Created by Administrator on 2023/11/23.
//
#include "iostream"

using namespace std;
const int N = 1e5;
int a[N];

void quick_sort(int l, int h) {
    if (l >= h) return;

    int pivot = a[l], i = l, j = h;
    while (i < j) {
        while (i < j && a[j] >= pivot) j--;
        a[i] = a[j];
        while (i < j && a[i] <= pivot) i++;
        a[j] = a[i];
    }
    a[i] = pivot;
    quick_sort(l, i - 1);
    quick_sort(i + 1, h);
}

int main() {
    int n;
    cin >> n;
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
    }
    quick_sort(0, n - 1);
    for (int i = 0; i < n; ++i) {
        cout << a[i] << " ";
    }
}